<%@ page language="java" import="java.util.*,com.hs.auth.model.*,com.hs.auth.*" pageEncoding="utf-8"%>
<%
HsAccount accInfo = (HsAccount)session.getAttribute(AUTHConstant.USERINSESSION); 
HsUserinfo userinfo = accInfo==null?null:accInfo.getUserinfo();

String accid = String.valueOf(accInfo==null?"":accInfo.getId());
Map authMap = (Map)session.getAttribute("USERPOWER_"+accInfo.getId()); 
 if(authMap == null)
	authMap = new HashMap();
String authstr = null;
String systemstr = null; 
 //String username = (String)request.getAttribute("username"); 
  System.out.println(authMap);
 
boolean isadmin = "system".equals(accInfo==null?"":accInfo.getLoginid());
boolean role1 = (authMap.get("SCHD_ROLE1")!=null);//系统管理员
boolean role2 = (authMap.get("SCHD_ROLE2")!=null); //全文检索人员
boolean role3 = (authMap.get("SCHD_ROLE3")!=null); //数据管理员
boolean role4 = (authMap.get("SCHD_ROLE4")!=null); //题录检索人员
 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<%@ include file="../include.jsp"%>   
<script language=JavaScript> 
function searchIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>search/index.do"; 
}
function dictIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>common/dict/dictFrame.jsp";
}
function userIndex(){
     
	window.parent.cont.frameElement.src="<%=basePath%>auth/userFrame.do";
	 
}
function paperIndex(){
 	window.parent.cont.frameElement.src="<%=basePath%>data/mod/dataListFrame.do"; 
}
function bookIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>data/old/booklistframe.do"; 
}
function impIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>data/import/importManage.do"; 
}
function standIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>standard/standdataframe.do"; 
}
function tagsIndex(){
	window.parent.cont.frameElement.src="<%=basePath%>standard/tagsframe.do"; 
}
</script>
</head>
<body class="menu_bg">
<div class="user">欢迎您： <%=userinfo==null?"":userinfo.getUsername()%></div>
    <div class="menu">
    <a href="javaScript:searchIndex();" class="curr"><span>文献检索</span></a>
    <%if(isadmin||role1||role3){%>
    <a href="javaScript:paperIndex();"><span>期刊管理</span></a>
    <a href="javaScript:bookIndex();"><span>古籍管理</span></a>
    <a href="javaScript:impIndex();"><span>数据导入</span></a>
    <!-- a href="javaScript:standIndex();"><span>标准数据</span></a-->
     <%} %>
    <%if(role1||isadmin){%>
    	<a href="javaScript:userIndex();"><span>用户管理</span></a>
    	<a href="javaScript:dictIndex();"><span>系统管理</span></a>
    <%} %>     
</div>
</body>
</html> 
 